import React from 'react';
import { Link, Route, Switch } from 'react-router-dom';
import Hot from './Hot';
import Fast from './Fast';

export default class Home extends React.Component {
  render() {
    return (
      <div>
        <div>我是首页</div>
        <div>首页的导航</div>
        <hr />
        <ul>
          <li>
            <Link to="/home">热销</Link>
          </li>
          <li>
            <Link to="/home/fast">抢购</Link>
          </li>
        </ul>
        <hr />
        <Switch>
          <Route exact path="/home" component={Hot} />
          <Route path='/home/fast' component={Fast} />
        </Switch>
      </div>
    );
  }
}
